{% load static %}
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
  <!-- Sidebar Menu -->
  <ul class="sidebar-menu" data-widget="tree">
    
    <!-- Optionally, you can add icons to the links -->
    <li id="overview"><a href="/manage"><i class="fa fa-dashboard"></i> <span>工作台</span></a></li>
    <li id="doc"><a href="/manage/doc"><i class="fa fa-book"></i> <span>使用文档</span></a></li>
    {% if request.user.type_id == 2 %}
    <li id="userTree" class="treeview">
      <a href="#"><i class="fa fa-user"></i> <span>用户及权限</span>
        <span class="pull-right-container">
            <i class="fa fa-angle-left pull-right"></i>
          </span>
      </a>
      <ul class="treeview-menu">
        <li id="user_manage"><a href="/manage/user_manage">用户管理</a></li>
        <li id="role_manage"><a href="/manage/role_manage">角色管理</a></li>
        <li id="dept_manage"><a href="/manage/dept_manage">部门管理</a></li>
        <li id="token_manage"><a href="/manage/app_token_manage">调用权限</a></li>
      </ul>
    </li>
    {% endif %}
    {% if request.user.type_id == 1 or request.user.type_id == 2 %}
    <li id="ticket_manage"><a href="/manage/ticket_manage"><i class="fa fa-list-alt"></i> <span>工单管理</span></a></li>
    {% endif %}
    {% if request.user.type_id == 1 or request.user.type_id == 2 %}
    <li id="workflowTree" class="treeview">
      <a href="#"><i class="fa fa-user"></i> <span>工作流管理</span>
        <span class="pull-right-container">
            <i class="fa fa-angle-left pull-right"></i>
          </span>
      </a>
      <ul class="treeview-menu">
        <li id="workflow_manage"><a href="/manage/workflow_manage">工作流配置</a></li>
        {% if request.user.type_id == 2 %}
        <li id="run_script_manage"><a href="/manage/run_script_manage">执行脚本</a></li>
        <li id="notice_manage"><a href="/manage/notice_manage">通知管理</a></li>
        {% endif %}
      </ul>
    </li>
   {% endif %}

  </ul>
  <!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
</aside>
